home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
LOGIC Apps
/
Logic-APPLE_II_APPS.iso
/
mac
/
LOGIC Apple II 5.25" Library - DOS Part 2
/
DOS027.dsk
/
STARS.bas
< prev
next >
Wrap
BASIC Source File
|
2012-02-16
|
2KB
|
58 lines
70 HOME
90 SPEED= 150
100 REM *** STARS *** STARS *** STARS*** STARS *** STARS ***
110 REM *** PROGRAMMED BY K.G. WELK
120 PRINT "WELCOME TO MY GALAXY. I'M IN CHARGE OF THE STARS HERE"
130 PRINT "PLAY MY GAME *<CTRL-G>STARS<CTRL-G>*<CTRL-G> AND GET SOME STARS FOR YOURSELF!"
140 PRINT
150 PRINT "WANT TO KNOW HOW TO PLAY ";
160 INPUT Z$
170 IF Z$ < >"Y" THEN 280
180 REM *** HERE IS HOW TO PLAY
190 PRINT
200 PRINT "I WILL THINK OF A WHOLE NUMBER FROM 1 TO 100."
210 PRINT "TRY TO GUESS MY NUMBER. AFTER YOU GUESS, I"
220 PRINT "WILL TYPE ONE OR MORE STARS (*<CTRL-G>). THE CLOSER"
230 PRINT "YOU ARE TO MY NUMBER, THE MORE STARS (*<CTRL-G>) I WILL TYPE."
240 PRINT "ONE STAR (*<CTRL-G>) MEANS YOU ARE FAR AWAY FROM MY "
250 PRINT " NUMBER. SEVEN STARS (*******<CTRL-G><CTRL-G><CTRL-G><CTRL-G><CTRL-G><CTRL-G><CTRL-G>)MEANS YOU ARE VERY,"
260 PRINT "VERY, VERY CLOSE TO MY NUMBER!!!"
270 REM *** COMPUTER 'THINKS' OF A NUMBER FROM 1 TO 100
280 LET X = INT(100 * RND(1)) +1
290 PRINT
300 PRINT "OK, STARSEEKER, I AM THINKING OF A NUMBER. START GUESSING."
310 REM *** GUESSING BEGINS
320 LET N = 1
330 PRINT
340 PRINT "WHAT IS YOUR GUESS?";
350 INPUT G
360 IF G = X THEN 550
370 LET D = ABS(G -X)
380 IF D > = 64 THEN 500
390 IF D > = 32 THEN 490
400 IF D > = 16 THEN 480
410 IF D > = 8 THEN 470
420 IF D > = 4 THEN 460
430 IF D > = 2 THEN 450
440 PRINT "*<CTRL-G>";
450 PRINT "*<CTRL-G>";
460 PRINT "*<CTRL-G>";
470 PRINT "*<CTRL-G>";
480 PRINT "*<CTRL-G>";
490 PRINT "*<CTRL-G>";
500 PRINT "*<CTRL-G>";
510 PRINT
520 LET N = N +1
530 GOTO 330
540 REM *** PLAYER HAS GUESSED THE GALACTIC NUMBER
550 FOR K = 1 TO 18
560 PRINT " **<CTRL-G><CTRL-G> ";
570 NEXT K
580 PRINT " !!! "
590 PRINT "THAT'S IT!!! YOU GUESSED MY COSMIC NUMBER IN ";N;" GUESSES."
600 PRINT
610 PRINT "WANT TO PLAY AGAIN";
620 INPUT Z$
630 IF Z$ = "Y" THEN 280
640 PRINT "OK, GOODBYE FOR NOW. PLAY WITH ME AGAIN SOMETIME."
650 END